package demo5;


import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
//@Service
//@Controller
//@Repository
public class Person {
//    @Autowired
//    @Resource(name = "sweater")
    @Resource
    private Clothes sweater;
    public void play() {
        sweater.wear();
        System.out.println("出去玩");
    }
}